home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / install / package-.1 / package- / package-0.1 / INSTALL
Text File  |  1993-04-01  |  1KB  |  43 lines

  1. #!/bin/sh
  2.  
  3. echo "This is script does a brute force install of the package manager."
  4. echo
  5.  
  6. ans=
  7. while [ "$ans" != "y" -a "$ans" != "Y" -a "$ans" != "n" -a "$ans" != "N" ]
  8. do
  9.     echo -n "Are you sure you want to do this? (y/n) "
  10.     read ans
  11. done
  12.  
  13. if [ "$ans" = "n" -o "$ans" = "N" ]; then
  14.     exit 0
  15. fi
  16.  
  17. if [ ! -d /etc/default ]; then
  18.     mkdir /etc/default
  19. fi
  20. cp    default/package        /etc/default/package
  21.  
  22. ln    bin/initialise        /bin/initialise || \
  23.     ln -s    bin/initialise        /bin/initialise
  24. ln    bin/makeinit        /bin/makeinit || \
  25.     ln -s    bin/makeinit        /bin/makeinit
  26. ln    bin/pkg            /bin/pkg || \
  27.     ln -s    bin/pkg            /bin/pkg
  28.  
  29. ln    man/pkg.1        /usr/man/man1/pkg.1 || \
  30.     ln -s    man/pkg.1        /usr/man/man1/pkg.1
  31.  
  32. ln    usr.lib/pipe-inst    /usr/lib/pkg/pipe-inst || \
  33.     ln -s    usr.lib/pipe-inst    /usr/lib/pkg/pipe-inst
  34. ln    usr.lib/pipe-rm        /usr/lib/pkg/pipe-rm || \
  35.     ln -s    usr.lib/pipe-rm        /usr/lib/pkg/pipe-rm
  36. ln    usr.lib/prepare        /usr/lib/pkg/prepare || \
  37.     ln -s    usr.lib/prepare        /usr/lib/pkg/prepare
  38.  
  39. # Now the package manager is installed we can reinstall it with itself
  40. # so it appears in the necessary lists etc.
  41. locn=`cd ..; pwd`
  42. pkg -q --target / --add $locn/package* --rebuild
  43.